<template>
        <tfoot>
        <tr>
          <td>合计:{{ sumFn }}</td>
          <td colspan="5">
           
          </td>
        </tr>
      </tfoot>
</template>

<script>
export default {
props:{
  goodList:{
    type:Array
  }
},
computed:{
  sumFn(){
   const arr = this.goodList.filter(item=> item.checked)
   return arr.reduce((sum,item)=>sum+(item.price*item.num),0)
  }
}
}
</script>

<style>

</style>